<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="panel panel-default panel-intro">
        <div class="panel-heading">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#basic" data-toggle="tab">基础信息</a></li>
                <li><a href="#sku" data-toggle="tab">库存/规格</a></li>
            </ul>
        </div>
        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="basic">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"><b class="text-danger">*</b>{:__('Category')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-category_id" data-rule="required" data-source="goods/category/index" data-field='title' class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"><b class="text-danger">*</b>{:__('Name')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"><b class="text-danger">*</b>{:__('Image')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-image"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-image"></ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"><b class="text-danger">*</b>{:__('Images')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-images"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-images"></ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"><b class="text-danger">*</b>{:__('Details')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <textarea id="c-details" class="form-control editor" rows="5" name="row[details]" cols="50">{$row.details|htmlentities}</textarea>

                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">虚拟{:__('Sales')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-virtual_sales" data-rule="required" class="form-control" name="row[virtual_sales]" type="number" value="{$row.virtual_sales}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            {:build_radios('row[type]', ['1'=>__('普通商品'), '2'=>__('推荐商品'), '3'=>__('一折专区'), '4'=>__('会员福利日')],$row['type'])}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            {:build_radios('row[status]', ['1'=>__('Normal'), '0'=>__('Hidden')],$row['status'])}
                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="sku">
                    <div class="goods-spec-many form-grou">
                        {include file="/shop/skugoods/sku" /}
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
            </div>
        </div>
    </div>
</form>
<style>
    [v-cloak] {
        display: none;
    }
</style>